%%
%% This docstrip .ins file makes it possible to unpack a docstrip
%% file using initex. This would enable a doc format LaTeX distribution 
%% to be bootstrapped just from the web (2c) sources for TeX, and the
%% LaTeX files. It saves building plain.fmt :-)
%%
%%  David Carlisle 
%%
\catcode`\Z=\catcode`\% 
\ifnum1=\catcode`\{{\egroup\else
  \catcode`\Z=9
Z
Z  \catcode`\{=1  \catcode`\}=2 
Z  \catcode`\#=6  \catcode`\^=7
Z  \catcode`\@=11 \catcode`\^^L=13
Z  \let\bgroup={  \let\egroup=}
Z
Z  \dimendef\z@=10 \z@=0pt \chardef\@ne=1 \countdef\m@ne=22 \m@ne=-1
Z
Z  \def\wlog{\immediate\write\m@ne} \def\space{ }
Z
Z  \count10=22 % allocates \count registers 23, 24, ...
Z  \count15=9 % allocates \toks registers 10, 11, ...
Z  \count16=-1 % allocates input streams 0, 1, ...
Z  \count17=-1 % allocates output streams 0, 1, ...
Z
Z  \def\alloc@#1#2#3{\advance\count1#1\@ne#2#3\count1#1\relax}
Z
Z  \def\newcount{\alloc@0\countdef} \def\newtoks{\alloc@5\toksdef}
Z  \def\newread{\alloc@6\chardef}   \def\newwrite{\alloc@7\chardef}
Z
Z  \def\newif#1{%
Z    \@if\def#1{true}{\let#1\iftrue}\@if\def#1{false}{\let#1\iffalse}%
Z    \@if\relax#1{false}}
Z
Z  \def\@if#1#2#3{%
Z    \expandafter#1\csname\expandafter\@gobblethree\string#2#3\endcsname}
Z  \def\@gobblethree#1#2#3{}
Z
Z  \def\loop#1\repeat{\def\body{#1}\iterate}
Z  \def\iterate{\body \let\next\iterate \else\let\next\relax\fi \next}
Z  \let\repeat\fi
Z
Z  \def\empty{}
Z
Z  \def\tracingall{\tracingcommands2 \tracingstats2 
Z    \tracingpages1 \tracingoutput1 \tracinglostchars1 
Z    \tracingmacros2 \tracingparagraphs1 \tracingrestores1 
Z    \showboxbreadth 10000 \showboxdepth 10000 \errorstopmode
Z    \errorcontextlines 10000 \tracingonline1 }
Z
\bgroup}\fi\catcode`\Z=11


\def\batchfile{unpack.ins}

\let\documentclass\undefined
\input ltdirchk.dtx
\input testdist.dtx
\input docstrip.dtx

{
\def\ProvidesFile#1\end#2{}
\def\everyjob#1\endinput{}
\@@input ltvers.dtx
\Msg{**********************************************}
\Msg{*}
\Msg{* Welcome to the Installation routine of}
\Msg{*}
\Msg{* \space\space\space\space\fmtname\space <\fmtversion>}
\Msg{*}
\Msg{* Depending on your machine the installation}
\Msg{* might take a long time --- this is the}
\Msg{* price for being able to run on all platforms.}
\Msg{* So please be patient :-)}
\Msg{*}
\Msg{**********************************************}
\Msg{}
\Msg{}
}

\let\OriginalAsk=\Ask
\def\Ask#1#2{%
  \OriginalAsk{#1}{#2}%
  \global\let\Ask\OriginalAsk
  \Ask\noprompt{%
  By default you will be asked this question for every file.^^J%
  If you enter `y' now, I will asssume `y' for all future questions^^J%
  without prompting.}%
   \ifx\y\noprompt\gdef\Ask##1##2{\def##1{y}}\else
      \ifx\yes\noprompt\gdef\Ask##1##2{\def##1{y}}\fi\fi}
           
   

\testdistribution{manifest.txt}{Missing distribution files.}{%
   The above files are missing from your LaTeX2e distribution.
^^JYou should be able to get the files from the same source as
^^Jthe rest of the distribution.  If you can't, then complain!
^^JThe full list of LaTeX2e distributed files is in manifest.txt.
^^JMore information about the installation is in install.txt.
^^JPress <RETURN> to continue, or X<RETURN> to exit.
}


\keepsilent


\preamble

Copyright 1994 the LaTeX3 project and the individual authors.
All rights reserved.  For further copyright information see the file 
legal.txt, and any other copyright indicated in this file.

This file is part of the LaTeX2e system.
----------------------------------------

 This system is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


IMPORTANT NOTICE:

For error reports in case of UNCHANGED versions see readme files.

Please do not request updates from us directly.  Distribution is
done through Mail-Servers and TeX organizations.

You are not allowed to change this file.

You are allowed to distribute this file under the condition that
it is distributed together with all files mentioned in 00readme.txt.

If you receive only some of these files from someone, complain!

You are NOT ALLOWED to distribute this file alone.  You are NOT
ALLOWED to take money for the distribution or use of either this
file or a changed version, except for a nominal charge for copying
etc.
\endpreamble

\let\mainpreamble\WritePreamble

\def\Lbatchinput#1{%
  \let\savedpream\WritePreamble
  \let\savedpostam\WritePostamble
  \batchinput{#1}
  \let\WritePreamble\savedpream
  \let\WritePostamble\savedpostam}

\generateFile{oldlfont.sty}{t}{%
  \from{oldlfont.dtx}{package}
}

\generateFile{newlfont.sty}{t}{%
  \from{newlfont.dtx}{package}
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% \generateFile{fltrace.sty}{t}{%       %%% not yet finished
%  \from{ltoutput.dtx}{fltrace,trace}
% }

\generateFile{flafter.sty}{t}{%
  \from{ltoutput.dtx}{flafter,trace}
}

%%% generate .def files for encoding support

\Lbatchinput{inputenc.ins}
\Lbatchinput{ltoutenc.ins}

%%% generate main kernel file

\generateFile{latex.ltx}{t}{%
  \from{ltdirchk.dtx}{initex,2ekernel,dircheck}
  \from{ltplain.dtx}{2ekernel}
  \from{ltvers.dtx}{2ekernel}
  \from{ltalloc.dtx}{2ekernel}
  \from{ltdefns.dtx}{2ekernel}
  \from{ltcntrl.dtx}{2ekernel}
  \from{lterror.dtx}{2ekernel}
  \from{ltpar.dtx}{2ekernel}
  \from{ltspace.dtx}{2ekernel}
  \from{ltlogos.dtx}{2ekernel}
  \from{ltfiles.dtx}{2ekernel}
  \from{ltoutenc.dtx}{2ekernel}
  \from{ltfss.dtx}{!driver}
  \from{ltfntcmd.dtx}{2ekernel}
  \from{ltcounts.dtx}{2ekernel}
  \from{ltpageno.dtx}{2ekernel}
  \from{ltxref.dtx}{2ekernel}
  \from{ltlength.dtx}{2ekernel}
  \from{ltmiscen.dtx}{2ekernel}
  \from{ltmath.dtx}{2ekernel}
  \from{ltlists.dtx}{2ekernel}
  \from{ltboxes.dtx}{2ekernel}
  \from{lttab.dtx}{2ekernel}
  \from{ltpictur.dtx}{2ekernel}
  \from{ltthm.dtx}{2ekernel}
  \from{ltsect.dtx}{2ekernel}
  \from{ltfloat.dtx}{2ekernel}
  \from{ltidxglo.dtx}{2ekernel}
  \from{ltbibl.dtx}{2ekernel}
  \from{ltpage.dtx}{2ekernel}
  \from{ltoutput.dtx}{2ekernel}
  \from{ltclass.dtx}{2ekernel}
  \from{ltfinal.dtx}{2ekernel}  
}


\generateFile{ltxcheck.tex}{t}{%
  \from{ltdirchk.dtx}{ltxcheck}}



%%%%%%%%%%%%%%%%% CUSTOMISABLE FILES

\keepsilent

\preamble

Copyright 1994 the LaTeX3 project and the individual authors.
All rights reserved.  For further copyright information see the file 
legal.txt, and any other copyright indicated in this file.


This file is part of the LaTeX2e system.
----------------------------------------

 This system is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This is a generated file.  

No permission is granted to modify this file.

To customize the hyphenation tables used in LaTeX2e, install a file with
the name hyphen.cfg. If the .cfg file can be found it will be
automatically used and this file will be ignored. See documentation
for details.

\endpreamble


\generateFile{hyphen.ltx}{t}{%
  \from{lthyphen.dtx}{default}
}


\preamble

Copyright 1994 the LaTeX3 project and the individual authors.
All rights reserved.  For further copyright information see the file 
legal.txt, and any other copyright indicated in this file.

This file is part of the LaTeX2e system.
----------------------------------------

 This system is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This is a generated file.  

No permission is granted to modify this file.

To customize the text font definition used in LaTeX2e, install a file
with the name fonttext.cfg. If the .cfg file can be found it will be
automatically used and this file will be ignored. See documentation
for details.

We recommend that you copy the relevant portions of the original
source file into a private .dtx and produce the .cfg from that source.

\endpreamble


\generateFile{fonttext.ltx}{t}{
     \from{fontdef.dtx}{text}}


\preamble

Copyright 1994 the LaTeX3 project and the individual authors.
All rights reserved.  For further copyright information see the file 
legal.txt, and any other copyright indicated in this file.

This file is part of the LaTeX2e system.
----------------------------------------

 This system is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This is a generated file.  

No permission is granted to modify this file.

To customize the math font definition used in LaTeX2e, install a file
with the name fontmath.cfg. If the .cfg file can be found it will be
automatically used and this file will be ignored. See documentation
for details.

We recommend that you copy the relevant portions of the original
source file into a private .dtx and produce the .cfg from that source.

\endpreamble


\generateFile{fontmath.ltx}{t}{
     \from{fontdef.dtx}{math}}


\preamble

Copyright 1994 the LaTeX3 project and the individual authors.
All rights reserved.  For further copyright information see the file 
legal.txt, and any other copyright indicated in this file.

This file is part of the LaTeX2e system.
----------------------------------------

 This system is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This is a generated file. 

No permission is granted to modify this file.

To customize the preloads used in LaTeX2e, install a file with the
name preload.cfg. If the .cfg file can be found it will be
automatically used and this file will be ignored. See documentation
for details.

\endpreamble


\generateFile{preload.ltx}{t}{%
  \from{preload.dtx}{preload,cm,xpt,tex}}





%%%%%%%%%%%%%%%%%%%%%%%%%%%% OTHER PACKAGES
\let\WritePreamble\mainpreamble

\Lbatchinput{classes.ins}

\Lbatchinput{letter.ins}

\Lbatchinput{slides.ins}

\Lbatchinput{proc.ins}

\Lbatchinput{latexsym.ins}

\Lbatchinput{cmfonts.ins}

\Lbatchinput{latex209.ins}

\Lbatchinput{docstrip.ins}

\Lbatchinput{ifthen.ins}

\Lbatchinput{graphpap.ins}

\Lbatchinput{pict2e.ins}

\Lbatchinput{makeindx.ins}

\Lbatchinput{syntonly.ins}

\Lbatchinput{exscale.ins}

\Lbatchinput{alltt.ins}


\testdistribution{unpacked.txt}{Missing unpacked files.}{%
   The above files should have been unpacked by this installation.
^^JIf they are missing, then this means that something is wrong.
^^JRead install.txt to find out what to do now.
^^JThe list of files which should have been unpacked is in unpacked.txt.
^^JPress <RETURN> to continue, or X<RETURN> to exit.
}

\Msg{}
\Msg{***********************************}
\Msg{*}
\Msg{*  Now run INITEX on latex.ltx}
\Msg{*}
\Msg{***********************************}
\Msg{}

\endinput
